package edu.ahut.corejava2.oop.v2;

public class Pillar {
    double height;
    IBase base;

    public Pillar(double height, IBase base) {
        this.height = height;
        this.base = base;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public IBase getBase() {
        return base;
    }

    public void setBase(IBase base) {
        this.base = base;
    }

    double volume() {
        return base.area();
    }

    public Pillar() {
    }

    public Pillar(double height) {
        this.height = height;
    }
}
